package com.kmxd.ams.infra.archive.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kmxd.ams.infra.archive.entity.ArchiveType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 门类|档案库配置主表 Mapper 接口
 *
 * @author ZuoLG
 * @since 2022-07-15
 */
public interface ArchiveTypeMapper extends BaseMapper<ArchiveType> {
    /**
     * 根据全宗id获取当前数量的档案库
     *
     * @param fondsId
     * @return
     */
    Long countArchTypeByFonds(Long fondsId);

    /**
     * 查询ams门类
     *
     * @return
     */
    @Select("select * from s_archive_type where del_flag = 0")
    List<ArchiveType> selectListByAms();
}
